<template>
  <div class="boxfan">
    <!-- 头部 -->
    <div class="htear">
      <div class="left">
        <div
          @click="$router.go(-1)"
          class="return iconfont icon-arrowRight-copy-copy"
        ></div>
        <div class="name">粉丝榜（35.37万）</div>
      </div>
      <div class="right">
        <div class="searchcon iconfont icon-31sousuo"></div>
        <div
          is-link
          @click="showPopup"
          class="classification iconfont icon-a-gengduofenlei"
        ></div>
      </div>
    </div>
    <!-- 弹出内容 -->
    <van-popup
      closeable
      v-model="show"
      position="top"
      :style="{ height: '45%' }"
    >
      <div class="boxpopup">
        <!-- 头部 -->
        <div class="htears">
          <div class="left">
            <div
              @click="$router.go(-1)"
              class="return iconfont icon-arrowRight-copy-copy"
            ></div>
            <div class="name">粉丝榜（35.37万）</div>
          </div>
        </div>
        <!-- 分类 -->
        <div class="guide-nav">
          <div class="box">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-home-copy"></use>
            </svg>
            <div class="boxtext">首页</div>
          </div>
          <div class="box">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-fenlei"></use>
            </svg>
            <div>分类</div>
          </div>
          <div class="box">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-daochu1024-02"></use>
            </svg>
            <div>排行榜</div>
          </div>
          <div class="box">
            <svg class="icon" aria-hidden="true">
              <use
                xlink:href="#icon-a-travelhotelholidayvacationcdlistingboo"
              ></use>
            </svg>
            <div>免费</div>
          </div>
          <div class="box">
            <svg class="icon sw" aria-hidden="true">
              <use xlink:href="#icon-wanjietuijian"></use>
            </svg>
            <div>完本</div>
          </div>
          <div class="box">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-huangguan"></use>
            </svg>
            <div>大神</div>
          </div>
        </div>
        <!-- 我的书架 -->
        <router-link tag="div" to="/bookshelf" class="mybookshelf">我的书架</router-link>
      </div>
    </van-popup>
    <!-- 粉丝列表 -->
    <div class="fanlists">
      <ul>
        <li v-for="(item,index) in fanlists" :key="index">
          <div class="left">{{index+1}}.</div>
          <div class="center">
            <div class="img">
              <img :src="item.img" alt="" />
              <span>{{item.title}}</span>
            </div>
            <p>{{item.name}}</p>
          </div>

          <div class="right">{{item.grade}}</div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false, //弹出判断
      fanlists:[{
          img:"https://facepic.qidian.com/qd_face/349573/6225375/50",
          title:"堂主",
          name:"木又队长",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/1/50",
          title:"堂主",
          name:"幸运小幅",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/3904523/50",
          title:"堂主",
          name:"饭后茶语",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/284/50",
          title:"堂主",
          name:"千月hhj",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/7222656/50",
          title:"堂主",
          name:"雨落长安忆",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/7222656/50",
          title:"堂主",
          name:"黑袍",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/7222656/50",
          title:"堂主",
          name:"泰大书谜",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/8187974/50",
          title:"堂主",
          name:"书友20201021091226174",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/1191857/50",
          title:"堂主",
          name:"飞天幻舞",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/5992138/50",
          title:"堂主",
          name:"q不确定关系p",
          grade:1007238,
      },{
          img:"https://facepic.qidian.com/qd_face/349573/1855827/50",
          title:"堂主",
          name:"微风中的橙子",
          grade:1007238,
      }]
    };
  },
  methods: {
    //头部弹出
    showPopup() {
      this.show = true;
    },
  },
};
</script>

<style lang="less">
.boxfan {
  // 关闭按钮
  .van-popup__close-icon--top-right {
    top: 13px;
  }
  .boxpopup {
    .htears {
      width: 100%;
      display: flex;
      height: 22px;
      padding: 11px 0px 10px 0px;
      justify-content: space-between;
      align-items: center;
      .age {
        display: flex;
        height: 24px;
        border: 1px solid #ed424b;
        border-radius: 3px;
        div {
          font-size: 15px;
          line-height: 24px;
          color: #ed424b;
          padding: 0px 10px;
        }
        .com {
          background: #ed424b;
          color: white;
        }
      }
      .left,
      .right {
        display: flex;
        div {
          padding: 0px 10px;
          text-align: center;
          font-size: 18px;
          color: #3c3b3b;
        }
        .name {
          font-size: 14px;
          color: #424141;
        }
        .return {
          color: black;
        }
      }
    }
    .guide-nav {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      padding: 0px 16px;
      .box {
        width: 58px;
        height: 58px;
        line-height: 58px;
        text-align: center;
        margin: 12px 24px;
        div {
          position: relative;
          top: -33px;
          font-size: 14px;
        }
      }
    }
    .mybookshelf {
      margin: 20px 50px;
      text-align: center;
      padding: 8px 0px;
      font-size: 14px;
      color: white;
      font-weight: 500;
      background-color: #ed424b;
      border-radius: 20px;
    }
    .sw {
      font-size: 40px;
    }
  }
  .htear {
    width: 100%;
    display: flex;
    height: 22px;
    padding: 11px 0px 10px 0px;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8e7e7;
    background-color: white;
    .left,
    .right {
      display: flex;
      div {
        padding: 0px 10px;
        text-align: center;
        font-size: 18px;
        color: #3c3b3b;
      }
      .name {
        font-size: 14px;
        color: #424141;
      }
      .return {
        color: black;
      }
    }
    .age {
      display: flex;
      height: 24px;
      border: 1px solid #ed424b;
      border-radius: 3px;
      div {
        font-size: 15px;
        line-height: 24px;
        color: #ed424b;
        padding: 0px 10px;
      }
      .com {
        background: #ed424b;
        color: white;
      }
    }
  }
  .fanlists {
    width: 100%;
    background-color: white;
    ul {
      li {
        margin-left: 50px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid #efefef;
        position: relative;
        .left {
          padding: 5px 16px;
          position: absolute;
          color: #33373d;
          font-size: 16px;
          font-weight: 600;
          left: -50px;
        }
        .center {
            display: flex;
                align-items: center;
          .img {
            width: 48px;
            display: flex;
            padding: 8px 0px;
            flex-direction: column;
            align-items: center;
            img {
              width: 100%;
              border-radius: 50%;
            }
            span {
              position: absolute;
              bottom: 8px;
              font-size: 12px;
              color: white;
              background-color: #f38361;
              padding: 0px 7px 0px 7px;
              border-radius: 8px;
              border-top: 1px solid white;
              border-left: 1px solid white;
              border-right: 1px solid white;
            }
          }
          p{
              color: #33373D;
              font-size: 16px;
              font-weight: 600;
              padding-left: 8px;
          }
        }
        .right {
            color: #969BA3;
            position: absolute;
            right: 0px;
            font-size: 14px;
            padding-right: 16px;
        }
      }
    }
  }
}
</style>